<?php
     $listorder=$_REQUEST['listorder'];
	 
	$con=mysqli_connect('localhost', 'root','', 'chongqinghuoguo110');
	if($con){
			mysqli_set_charset($con,'utf8');
		if($listorder==1){
			$sql="select * from dish limit 9 ";
		}else{
			$sql="select * from dish where listorder='{$listorder}'";
		}
		
		$result=mysqli_query($con,$sql);
		$arr=mysqli_fetch_all($result,MYSQLI_ASSOC);
		$str=json_encode($arr);
		echo $str;
	
	}else{
		echo "链接未遂".mysqli_connect_error();
	}
	
	
	mysqli_close($con);
	
	
	
	
	?>